//
//  String+MLExpression.swift
//  ExpressionDemo
//
//  Created by aby on 2018/8/6.
//  Copyright © 2018 aby. All rights reserved.
//

import Foundation

extension String {
    func expressionAttributeString() -> NSAttributedString {
        let expression = MLExpression.init(regex: "\\[[a-zA-Z0-9\\u4e00-\\u9fa5]+\\]", plistName: "Expression", bundleName: "ClippedExpression")
        return expression.expressionAttributedString(string: self)
    }
}
